from src.game.entity.powerup import PowerUp
from src.game.entity.living import EntityLiving
from src.game.buff.regeneration import RegenerationBuff
from src.handler.sprite import SpriteHandler

class HealUp(PowerUp):
    
    name = "healup"
    
    def getSprite(self):
        return SpriteHandler.get("healup")
            
    def addEffect(self, entity):
        if isinstance(entity, EntityLiving):
            entity.addBuff(RegenerationBuff())
            self.active = False